package com.ck.core.lock;

/**
 * @author linqiang
 * @version v1.0
 * @Description 锁常量
 * @date 2019-03-11 11:11
 */
public class LockConstant {
    /**
     * 订单状态更新锁前缀
     */
    public static final String ORDER_STATUS_CHANGE_LOCK_PREFIX = "CK_LOCK_ORDER_";
    /**
     * 订单状态更新锁前缀
     */
    public static final String UPLOAD_PROGRAM_DOWNLOAD_STATUS_LOCK_PREFIX = "CK_CLIENT_LOCK_UPLOAD_PROGRAM_DOWNLOAD_STATUS_";

    /**
     * job任务执行加锁前缀
     */
    public static final String JOB_TASK_EXECUTE_LOCK_PREFIX = "CK_JOB_TASK_EXECUTE_LOCK_PREFIX_";

    /**
     * 绑定设备加锁
     */
    public static final String DEVICE_BIND_LOCK_PREFIX = "CK_DEVICE_BIND";

    /**
     * redis锁默认有效期时间（秒）
     */
    public static final Long DEFAULT_TIMEOUT_MILLS = 60L;

    /**
     * 清洗监播数据redis锁默认有效期时间（秒）
     */
    public static final Long DEFAULT_MONITOR_TIMEOUT_MILLS = 600L;

    /**
     * 获取锁重试次数
     */
    public static final int MAX_RETRY_TIMES = 3;

    /**
     * 清洗监播数据无需重复尝试
     */
    public static final int MAX_MONITOR_RETRY_TIMES = 0;

    /**
     * 每次重试之前sleep等待的毫秒数
     */
    public static final long RETRY_INTERVAL_TIME_MILLIS = 3000;

    /**
     * 节目下线锁前缀
     */
    public static final String PROGRAM_OFF_LINE_LOCK_PREFIX = "CK_LOCK_PROGRAM_OFF_LINE_";

    /**
     * 节目审批锁前缀
     */
    public static final String PROGRAM_AUTH_LOCK_PREFIX = "CK_LOCK_PROGRAM_AUTH_";
    /**
     * 节目审批通过锁前缀
     */
    public static final String PROGRAM_PASS_LOCK_PREFIX = "CK_LOCK_PROGRAM_PASS_";
    /**
     * 节目审批驳回锁前缀
     */
    public static final String PROGRAM_REJECT_LOCK_PREFIX = "CK_LOCK_PROGRAM_REJECT_";

    /**
     * 检查节目状态任务锁前缀
     */
    public static final String CHECK_PROGRAM_STATUS_JOB_LOCK_PREFIX = "CK_LOCK_CHECK_PROGRAM_STATUS_JOB_";
    /**
     * 节目发布锁前缀
     */
    public static final String PROGRAM_PUSH_LOCK_PREFIX = "CK_LOCK_PROGRAM_PUSH_";
    /**
     * 监播同步节目锁前缀
     */
    public static final String MONITOR_PROGRAM_LOCK_PREFIX = "CK_LOCK_MONITOR_PROGRAM_";
    /**
     * 监播同步素材锁前缀
     */
    public static final String MONITOR_FILE_LOCK_PREFIX = "CK_LOCK_MONITOR_FILE_";

    /**
     * 上传视频锁
     */
    public static final String UPLOAD_VIDEO_LOCK = "CK_LOCK_UPLOAD_VIDEO";
}
